package track2.experiment;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;

import track2.bayes.IdClassifier;
import track2.bayes.IdFeatures;
import track2.bayes.IdTestClassifier;
import track2.context.Config;
import track2.result.Result;
import track2.result.ResultFileTool;

public class featureTest {
	public static void main(String[] args) throws IOException, ClassNotFoundException {
		String path = "/home/ec2-user/bigml/kdd2012/model/beifen/idNaiveBayesFeature_no_prior";
		File file = new File(path);
		FileInputStream fs = new FileInputStream(file);
		ObjectInputStream os = new ObjectInputStream(fs);
		IdFeatures feature = (IdFeatures) os.readObject();
		Result result = IdTestClassifier.test(feature, Config.testFilePath);
		ResultFileTool.outputResult(result, Config.idnbTestResultPath);
	}

}
